from flask_restful import Api

from apps.settingApi.api.lessees.views import lesseesValidListView,lesseesListView,lesseesPkView,lesseesFunsListView
# from comm.decorator import decorator_dealer, login_required

# lessees_api = Api(prefix='/setting/lessees/',decorators=[decorator_dealer(),login_required()])
lessees_api = Api(prefix='/setting/lessees/')

lessees_api.add_resource(lesseesListView,'/lesseeslist/',endpoint="lesseeslist")
lessees_api.add_resource(lesseesPkView,'/lesseespk/<pk>/',endpoint="lesseespk")

# 获取所有未过期的租户
lessees_api.add_resource(lesseesValidListView,'/lesseesvalidlist/',endpoint="lesseesvalidlist")

# 获取所有租户的模块以及租户模块注册
lessees_api.add_resource(lesseesFunsListView,'/lesseesfunslist/',endpoint="lesseesfunslist")

